package ch.netcetera.planningpoker.shared;

import java.util.List;

import ch.netcetera.planningpoker.client.model.RoundProxy;
import ch.netcetera.planningpoker.server.dao.RoundDao;
import ch.netcetera.planningpoker.server.locator.DaoServiceLocator;

import com.google.web.bindery.requestfactory.shared.Request;
import com.google.web.bindery.requestfactory.shared.RequestContext;
import com.google.web.bindery.requestfactory.shared.Service;

@Service(value = RoundDao.class, locator = DaoServiceLocator.class)
public interface RoundRequest extends RequestContext {
    
    Request<RoundProxy> createRoundForGame(String title, Long gameId); 
    
    Request<List<RoundProxy>> getRoundsForGame(Long gameId);
    
    Request<RoundProxy> getOpenRoundForGame(Long gameId);
    
    Request<Void> closeRound(Long roundId);

}
